<template>
	<view class="wrap" style="padding-bottom: 60px;">
		<view class="info-box">
			<text>头像</text>
			<view class="right">
				<image src="/static/aidex/images/user01.png" mode="" class="user-image" @click="chooseAvatar"></image>
				<image src="/static/icon-jiantou.png" mode="" class="more"></image>
			</view>
		</view>
		<u-gap height="16" bg-color="#f5f5f5"></u-gap>
		<view class="myself">
			<view class="left">
				<text>昵称</text>
			</view>
			<u-input v-model="name" type="text" placeholder="请输入昵称" />
		</view>
	</view>
</template>
<script>
/**
 * Copyright (c) 2013-Now http://aidex.vip All rights reserved.
 */
export default {
	data() {
		return {
			model: {
				sex: '1'
			},
			rules: {

			},
			name: '名字',
			avatarBase64: ''
		};
	},
	onLoad() {
		uni.$on('uAvatarCropper', path => {
			this.avatarBase64 = path;
		})
	},
	onReady() {
		
	},
	methods: {
		chooseAvatar() {
			this.$u.route({
				url: '/uview-ui/components/u-avatar-cropper/u-avatar-cropper',
				params: {
					destWidth: 200, // 输出图片宽高
					rectWidth: 200, // 裁剪框的宽高
					fileType: 'jpg', // 输出的图片类型，如果'png'类型发现裁剪的图片太大，改成"jpg"即可
				}
			})
		}
	}
};
</script>
<style lang="scss" scoped>
	page{
		background: #f5f5f5;
	}
	.u-form{
		background: #fff;
		padding:0 15px;
	}
.u-size-medium{
    height: 60rpx;
    line-height: 60rpx;
    padding: 0 20px;
	font-size:28rpx;
	background-color: rgba(0, 0, 0, 0.1);
	color:#fff;
	border: 1px solid #5186e7;
}
.u-hairline-border:after{
	border: 1px solid #5186e7!important;
}
.input-placeholder{
	text-align: right;
}
.u-input{
	text-align: right !important;
}
.u-form-item{
	font-size:36rpx;
}
.info-box {
	height: 140rpx;
	background: #fff;
	padding: 0 16rpx 0 30rpx;
	display: flex;
	align-items: center;
	justify-content: space-between;
	text {
		font-family: PingFangSC, PingFang SC;
		font-weight: 400;
		font-size: 32rpx;
		color: #333333;
		line-height: 44rpx;
		text-align: left;
		font-style: normal;
	}
	.right {
		display: flex;
		align-items: center;
		.user-image {
			width: 88rpx;
			height: 88rpx;
			margin-right: 20rpx;
		}
		.more {
			width: 44rpx;
			height: 44rpx;
		}
	}
}
.myself {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12rpx 30rpx;
	background: #fff;
	.left {
		display: flex;
		align-items: center;
		image {
			width: 40rpx;
			height: 40rpx;
			margin-right: 12rpx;
		}
		text {
			font-family: PingFangSC, PingFang SC;
			font-weight: 500;
			font-size: 28rpx;
			color: #333333;
			line-height: 40rpx;
			text-align: left;
			font-style: normal;
		}
	}
	image {
		width: 44rpx;
		height: 44rpx;
	}
}
</style>
